﻿using System;
using System.Web;
using BLL;

namespace Web.ashx
{
    /// <inheritdoc />
    /// <summary>
    ///     SaveMenu 的摘要说明
    /// </summary>
    public class SaveMenu : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            var userId = Convert.ToInt32(context.Request["userid"]);
            var menuId = context.Request["menuid"];
            var code = context.Request.Cookies["code"].Value;
            var helper = new SqlHelper();
            var result = helper.AddUserMenu(userId, menuId,code);
            context.Response.ContentType = "text/plain";
            context.Response.Write(result);
        }

        public bool IsReusable => false;
    }
}